﻿@model  ToquesDeDarsenaABM.Models.EditToqueDeDarsena

@{
    ViewBag.Title = "Edit";
}

@if(ViewBag.Editable)
{
    using (Html.BeginForm()) {
        @Html.ValidationSummary(true)

        <fieldset>
            <legend>Modificar Toque de Darsena</legend>

            @Html.HiddenFor(model => model.Id)

            <div class="editor-label">
                @Html.LabelFor(model => model.Interno)
            </div>
            
            <div class="editor-field">
                @Html.EditorFor(model => model.Interno)
                @Html.ValidationMessageFor(model => model.Interno)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.CodigoEmpresa)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(model => model.CodigoEmpresa)
                @Html.ValidationMessageFor(model => model.CodigoEmpresa)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.CodigoLocalidad)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(model => model.CodigoLocalidad)
                @Html.ValidationMessageFor(model => model.CodigoLocalidad)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Darsena)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Darsena)
                @Html.ValidationMessageFor(model => model.Darsena)
            </div><br />
            <p>
                <input type="submit" value="Guardar" />
            </p>
        </fieldset>
    }
}
else
{
    <div class="row">
        <div class="col-xs-3">
            <div class="well"><strong>El toque lleva más de un día creado: ya no se puede editar</strong></div>
        </div>
    </div>
    
}
<div>
    @Html.ActionLink("Volver", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
